package tmall.portal.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tmall.framework.response.ResponseResult;
import tmall.framework.service.IdService;

import javax.annotation.Resource;

@RestController
@RequestMapping("/rest/service/id")
public class IdController {


    @Resource
    private IdService idService;
    @GetMapping("/getDefaultId")
    public ResponseResult getDefaultId(){
        Long id = idService.nextId();
        return ResponseResult.success(id);
    }
}
